#pragma once
#include "../libsocket/HPSocket4C.h"
#include "../libsocket/SocketInterface.h"

#define ccc_new_lock static CRITICAL_SECTION critical_section; static PCRITICAL_SECTION s_critical_section = &critical_section
#define ccc_ptr_lock static PCRITICAL_SECTION s_critical_section = nullptr
#define ccc_init_lock InitializeCriticalSection(s_critical_section)
#define ccc_set_lock(_pcri_) s_critical_section = (PCRITICAL_SECTION)_pcri_
#define ccc_en_lock EnterCriticalSection(s_critical_section)
#define ccc_un_lock LeaveCriticalSection(s_critical_section)
#define ccc_del_lock DeleteCriticalSection(s_critical_section)
